import 'package:flutter/material.dart';
import 'package:huobi/model/homePage/market_block_model.dart';

class MarketBlockWidget extends StatelessWidget {

  final MarketBlockModel dataModel;

  const MarketBlockWidget({Key key, this.dataModel}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 80,
      width: MediaQuery.of(context).size.width / 3,
      child: Column(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Row(
            children: [
              Text(
                "${dataModel.name}",
                style: TextStyle(fontSize: 14, color: Colors.white),
              ),
              SizedBox(
                width: 2,
              ),
              Text(
                "+${dataModel.applies}%",
                style: TextStyle(fontSize: 12, color: Colors.green),
              ),
            ],
          ),
          Text(
            "${dataModel.price}",
            style: TextStyle(
                fontSize: 20, fontWeight: FontWeight.bold, color: Colors.green),
          ),
          Text(
            "\$${dataModel.price}",
            style: TextStyle(color: Colors.grey),
          ),
        ],
      ),
    );
  }
}
